package com.ning.weixin.exception;

import com.ning.weixin.enums.ResultEnum;

/**
 * 异常
 *
 * @author Cyan
 * @Date:2018/12/09
 */
public class NingException extends RuntimeException {

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public NingException(ResultEnum resultEnum) {

        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();

    }

    public NingException(Integer code, String message) {
        super(message);
        this.code = code;
    }

}
